/**
 * @Author: 田乐
 * @Date: 2019/08/27
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019/08/27
 */
const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 菜单路由
const menuRoutes = [
  {
    path: '/originDLR',
    meta: { title: '渠道管理', icon: 'el-icon-s-promotion' },
    redirect: '/originDLR',
    component: RouteView,
    children: [
      {
        path: '/originDLR/personnelInfo',
        meta: { title: '人员信息管理' },
        redirect: '/originDLR/personnelInfo',
        component: RouteView,
        children: [
          {
            path: '/originDLR/personnelInfo/postSet/index',
            meta: { title: '岗位查询', keepAlive: true },
            component: AsyncComponent('cms-pages/originDLR/personnelInfo/postSet/index')
          },
          {
            path: '/originDLR/personnelInfo/personnelInfoMaintain/index',
            meta: { title: '人员信息维护', keepAlive: true },
            component: AsyncComponent('cms-pages/originDLR/personnelInfo/personnelInfoMaintain/index')
          }
        ]
      },
      {
        path: '/origin/originInfo',
        meta: { title: '渠道信息管理' },
        redirect: '/origin/originInfo',
        component: RouteView,
        children: [
            {
                path: '/origin/originInfo/inform/index',
                meta: { title: '经销商信息提报', keepAlive: true },
                component: AsyncComponent('cms-pages/origin/originInfo/inform/index')
              },
              {
            path: '/origin/originInfo/inquire/dealerIndex',
            meta: { title: '经销商信息查询', keepAlive: true },
            component: AsyncComponent('cms-pages/origin/originInfo/inquire/dealerIndex')
          }
        ]
      },
    ]
  }
];

export default menuRoutes;
